package com.umpay.controller.ebankpayment;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import com.umpay.annotation.ReceiveEntity;
import com.umpay.business.ebankpayment.EbankPayBusiness;
import com.umpay.controller.base.AbstractController;
import com.umpay.dto.UMFResponse.Message;
import com.umpay.dto.merBusi.req.ebankpayment.EbankPayOrderBusiReq;
import com.umpay.dto.merBusi.res.ebankpayment.EbankPayOrderBusiRes;

@RestController
public class EbankPaymentOrderController extends AbstractController{

	private static final Logger log = LogManager.getLogger(EbankPaymentOrderController.class);
	
	@Autowired
	private EbankPayBusiness ebankPayBusiness;
	
	@PostMapping("/consumeBusi/payment/ebank/order")
	@ReceiveEntity(type = EbankPayOrderBusiReq.class)
	public Message<EbankPayOrderBusiRes> EbankPayBusi(HttpServletRequest request,
			HttpServletResponse response) {
		EbankPayOrderBusiReq ebankPayBusiReq = getReqMessage(request);
		Message<EbankPayOrderBusiRes> Message = ebankPayBusiness
				.EbankPayOrderBusiness(ebankPayBusiReq);
		return Message;
	}
}
